using System;
using System.Collections.Generic;
using Mussel.Addins;
using Mussel.Data;
using NHibernate.Expression;

namespace Natrue.Popedom.Organizational
{
    [MusselType("IOrganizationalManager")]
    public interface IOrganizationalManager
    {
        DepartmentBase[] GetRootDepartment();
        DepartmentBase[] GetChildDepartment(Guid parentDepartmentId);
        Department GetDepartmentDetail(Guid departmentId);
        Department[] GetRootDepartments();
        Employee GetEmployeeDetail(string userName);
        Employee GetEmployeeDetail(Guid empId);
        Employee[] GetEmployeeList(Guid departmentId);
        Employee[] SearchEmployee(string keywork);
        Employee[] GetEmployeeList(int pageIndex, int pageSize, Order[] orderBy, params ICriterion[] criterion);
        DepartmentBase[] GetNotContainsDepartment(Guid departmentId);
        DepartmentBase GetDepartmentBaseDetail(Guid empId);
        DepartmentBase[] GetDepartmentBaseList(params ICriterion[] criterion);
        DepEmpRel[] GetDepEmpRelDetail(Employee employee);
        DepEmpRel[] GetDepEmpRelDetail(Guid employeeKey);
        string GetDepEmpRelDetailToStr(Guid employeeId);
        Role GetRoleToEmployee(Guid employeeId);
        int CalcEmployee(params ICriterion[] criterion);
        //DepEmpRel[] GetDepEmpRelList(int pageIndex, int pageSize, Order[] orderBy, params ICriterion[] criterion);

        void PostEmployeeInRole(User user, Guid roleId);
        void DeleteEmployeeInRole(Guid employeeId);
        void CreateDepartment(Department department);
        void UpdateDepartment(Department department);
        void DeleteDepartment(Guid departmentId);
        void CreateEmployee(Employee employee);
        void UpdateEmployee(Employee employee);
        void DeleteEmployee(Guid employeeId);
        void CreateDepEmpRel(DepEmpRel depEmpRel);
        void DeleteAllDepEmpRelForEmployee(Employee employee);

        void CreateJobTitle(JobTitle jobTitle);
        void UpdateJobTitle(JobTitle jobTitle);
        void DeleteJobTitle(Guid jobKey);
        JobTitle GetJobTitleDetail(Guid jobTitleKey);
        IList<JobTitle> GetJobTitleList();
    }
}